<%--
  Created by IntelliJ IDEA.
  User: ME08I
  Date: 2022/1/24
  Time: 17:12
  To change this template use File | Settings | File Templates.
--%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<!doctype html>
<html lang="en">
<head>
    <base href="<%=basePath%>">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="shortcut icon" href="${pageContext.request.contextPath}/img/favicon.ico" type="image/x-icon" >
    <title>信息技术志愿服务队报修管理系统</title>
    <c:import url="../styles/styles.jsp"/>
</head>

<body>
<c:import url="../navbar/navbar.jsp"/>
<c:import url="../navbar/sidenavbar.jsp"/>
<h2 class="sub-header">待接单</h2>
<div class="table-responsive">
    <table class="table table-striped">
        <thead>
        <tr>
<%--            <th>编号</th>--%>
            <th>报修人姓名</th>
            <th>联系方式</th>
            <th>地址</th>
            <th>问题描述</th>
            <th>报修时间</th>
            <th>指定出勤人员</th>
            <th>指定派单人员</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${userList}" var="user">
        <tr>
            <td>${user.username}</td>
            <td>${user.contact}</td>
            <td>${user.address}</td>
            <td>${user.question}</td>
            <td><fmt:formatDate value="${user.date}" pattern="yyyy-MM-dd"/></td>

            <form action="recoding/addRecoding" method="post">
                <input type="hidden" name="id" value="${user.id}">
                <input type="hidden" name="username" value="${user.username}">
                <input type="hidden" name="contact" value="${user.contact}">
                <input type="hidden" name="address" value="${user.address}">
                <input type="hidden" name="question" value="${user.question}">
                <input type="hidden" name="date" value="${user.date}">
                <td>
                    <label>
                        <select name="accender_name">
                            <option style="color: red" disabled>指定出勤人员</option>
                            <c:forEach items="${accenderList}" var="accender">
                                <option value="${accender.accender_name}">${accender.accender_name}</option>
                            </c:forEach>
                        </select>
                    </label>
                </td>

                <td>
                    <label>
                        <select name="sender">
                            <option style="color: red" disabled>指定派单人员</option>
                            <c:forEach items="${senderList}" var="sender">
                                <option value="${sender.name}">${sender.name}</option>
                            </c:forEach>
                        </select>
                    </label>
                </td>
                <td><input type="submit" value="确定"></td>
            </form>
            </c:forEach>
        </tr>
        </tbody>
    </table>
</div>
<c:import url="../styles/script.jsp"/>
</body>
</html>
